classdef Parameters < hgsetget
    %UNTITLED2 Summary of this class goes here
    %   Detailed explanation goes here
    
    properties
        %banderas de parámetros custom del modelo
        cust_diff
        cust_conv
        cust_reac
        cust_sour
        cust_temp
        
        %valores de parámetros constantes del modelo
        diffusion
        convection_x
        convection_y
        reaction
        source
        temporal
        
        %banderas de condiciones de borde de la geometria 2D
        ts_bc %top side
        ls_bc %left side
        bs_bc %botton side
        rs_bc %right side
        
        %valores de las condiciones de borde de la geometria 1D
        lp_Tref
        lp_q
        lp_H 
        rp_Tref
        rp_q
        rp_H
        
        %valores de las condiciones de borde de la geometria 2D
        ts_Tref
        ts_q
        ts_H
        ttype
        ls_Tref
        ls_q
        ls_H
        ltype
        bs_Tref
        bs_q
        bs_H
        btype
        rs_Tref
        rs_q
        rs_H
        rtype
        
        const_ini_sol %condicion inicial constante, tanto 1D como 2D
        cust_ini_sol
        %Variables de simulación
        time_scheme % 1-FE, 2-BE, 3-CN
        step_time
        total_time
        vectorization
        
        
        % Variables de utilidad sólo en la interfaz
        Gdirec
        Gtype_geo %1: linea, 2: placa, 3: L, 4: plato
        Gtype_shfunc %1: constante, 2:lineal, 3:cuadratica, 4: custom
        Gtype_ele_2d %1:triangulos, 2:rectangulos
        Gcierre
        ptype       % tipo de problema: calor o elasticidad
        npg
    end
    
    methods
        function [obj] = Parameters(obj)    
            obj.diffusion=0;
            obj.convection_x=0;
            obj.convection_y=0;
            obj.reaction=0;
            obj.source=0;
            obj.temporal=0;
            obj.cust_diff=false;
            obj.cust_conv=false;
            obj.cust_reac=false;
            obj.cust_sour=false;
            obj.cust_temp=false;
            obj.cust_ini_sol=false;
            obj.const_ini_sol=num2cell(0); % -1 no hay término temporal
            obj.ts_bc=false;
            obj.ls_bc=false;
            obj.bs_bc=false;
            obj.rs_bc=false;
            obj.ts_Tref=0;
            obj.ts_q=0;
            obj.ts_H=0;
            obj.ttype='';
            obj.ls_Tref=0;
            obj.ls_q=0;
            obj.ls_H=0;
            obj.ltype='';
            obj.bs_Tref=0;
            obj.bs_q=0;
            obj.bs_H=0;
            obj.btype='';
            obj.rs_Tref=0;
            obj.rs_q=0;
            obj.rs_H=0;
            obj.rtype='';
            obj.lp_H=0;
            obj.lp_q=0;
            obj.lp_Tref=0;
            obj.rp_H=0;
            obj.rp_q=0;
            obj.rp_Tref=0;
            obj.Gcierre=true;
            obj.npg=3;
        end
        
        function [obj] = b_set(obj,diff,conv_x,conv_y,reac,sour,temp)
            obj.diffusion=diff;
            obj.convection_x=conv_x;
            obj.convection_y=conv_y;
            obj.reaction=reac;
            obj.source=sour;
            obj.temporal=temp;
        end
        
        function [obj] = c_set(obj,c_d,c_c,c_r,c_s,c_t)
            obj.cust_diff=c_d;
            obj.cust_conv=c_c;
            obj.cust_reac=c_r;
            obj.cust_sour=c_s;
            obj.cust_temp=c_t;
        end
        
        function [obj] = ts_bc_set(obj,ts_bc)
            obj.ts_bc=ts_bc;
        end
        
        function [obj] = ls_bc_set(obj,ls_bc)
            obj.ls_bc=ls_bc;
        end
        
        function [obj] = bs_bc_set(obj,bs_bc)
            obj.bs_bc=bs_bc;
        end
        
        function [obj] = rs_bc_set(obj,rs_bc)
            obj.rs_bc=rs_bc;
        end
        
        function [obj] = set_dir(obj,direc)
            obj.Gdirec = direc;
        end
        
        function [obj] = set_ptype(obj,ptype)
            obj.ptype = ptype;
        end
        
        function [obj] = set_param_run(obj,time_sh,step_t,tot_t,vect)
            obj.time_scheme = time_sh;
            obj.step_time = step_t;
            obj.total_time = tot_t;
            obj.vectorization = vect;
        end
        
    end
    
end

